package com.gt.deceive.service.time;

import com.gt.deceive.entity.ZjTime;
import com.gt.deceive.mapper.TimeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("timeService")
public class TimeServiceImpl implements TimeService {
    @Autowired
    private TimeMapper timeMapper;
    @Override
    public Long add(ZjTime zjTime) {
        timeMapper.insertUseGeneratedKeys(zjTime);
        return zjTime.getId();
    }

    @Override
    public ZjTime query(Long id) {
        return timeMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<ZjTime> queryList(ZjTime zjTime) {
        return timeMapper.select(zjTime);
    }
}
